package com.xuxu.listener;

import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * RabbitMQ消费者
 */
@Component
public class RabbitConsumerListener {

    //监听某个队列的名称
    @RabbitListener(queues = "topic_queue_xuxu")
    public void myListener(String message){
        System.out.println("收到的消息是：         "+message);
    }

}
